-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ellipsize pill component contents when too large #1133
Conversation
FadhlanR
commented
Apr 3, 2024

There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
display: flex; | ||
max-width: 100px; | ||
} | ||
:deep(.atom-format) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice, I didn’t realise this was possible 🤩
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree it would be very convenient to be able to see the full text when the text is truncated
get isTooltipDisplayed() { | ||
// If card is an auto-attached card, we need to hide the tooltip | ||
// because there is another tooltip shows "Topmost card is shared automatically". | ||
return this._isTooltipDisplayed && !this.args.isAutoAttachedCard; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- There are now 2 clashing tooltips - how do you decide which one is more important?
- Logic got confusing because the pill component now has more context about its surroundings, for example needing to know there is another tooltip on top of it... ideally this should not be its responsibility
Have you considered what Buck suggested, a title
attribute?

There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the feedback! I didn't realize about the title attribute before. I reverted the commit regarding the tooltip and implemented title attribute instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of adding title in field-component
I moved it to card-pill
in this PR so we don't need to update field-component
and keep any changes in card-pill
file.
ffcf4c2
to
fae4d7d
Compare